package rounding;

public class Rounding {

	private double no1;
	private double no2;

	public Rounding(double a, double b) {
		no1 = a;
		no2 = b;
	}

	public String compareRounds() {
		if (Math.round(no1 * 100) == Math.round(no2 * 100)) {
			return "Equals when rounding";
		} else {
			return "Different when rounding";
		}
	}

	public String difference() {
		if (Math.abs(no1 - no2) < 0.01) {
			return "Differ by less than 0.01";
		} else
			return "Differ by more than 0.01";
	}
}
